home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-30 | 3.5 KB | 134 lines | [TEXT/KAHL] |
- /******************************************************************************
- x_CMain.cp
-
- CMain Document Class
-
- Copyright © 1994 My Software Inc. All rights reserved.
-
- Generated by Visual Architectâ„¢ 9:40 PM Wed, Jun 8, 1994
-
- This file is rewritten each time you generate code. You should not
- make changes to this file; changes should go in the My.cp
- file, instead.
-
- If you want to change how Visual Architect generates this file, you can
- change the template for this file. It is "_Doc_cp" in the Visual Architect
- Templates folder.
-
- ******************************************************************************/
-
- #include "x_CMain.h"
-
- #include "CMain.h"
-
- #include "MainItems.h"
-
- #include "ViewUtilities.h"
- #include "CApp.h"
-
- #include <CApplication.h>
- #include <CBartender.h>
- #include <Commands.h>
- #include <Constants.h>
- #include <CDecorator.h>
- #include <CDesktop.h>
- #include <CFile.h>
- #include <TBUtilities.h>
- #include <CWindow.h>
-
- extern CApplication *gApplication; /* The application */
- extern CDecorator *gDecorator; /* Decorator for arranging windows */
- extern CDesktop *gDesktop; /* The visible Desktop */
- extern CBartender *gBartender; /* Manages all menus */
-
- #include "CSubviewDisplayer.h"
-
- // Define symbols for commands handled by this class
- // Prevents a recompile every time any command changed.
-
-
-
- TCL_DEFINE_CLASS_M1(x_CMain, x_CMain_super);
-
- /**** C O N S T R U C T I O N / D E S T R U C T I O N M E T H O D S ****/
-
-
- /******************************************************************************
- Ix_CMain
-
- Initialize the document
- ******************************************************************************/
-
- void x_CMain::Ix_CMain()
-
- {
- IDocument(gApplication, TRUE);
-
- // Initialize data members below.
- }
-
-
- /******************************************************************************
- MakeNewWindow
-
- Create a new, empty window. Subclass may override to populate
- the new window.
- ******************************************************************************/
-
- void x_CMain::MakeNewWindow(void)
-
- {
- itsWindow = TCLGetNamedWindow("\pMain", this);
-
- itsMainPane = (CPane*) TCLGetItemPointer(itsWindow, 0);
-
- // Initialize pointers to the subpanes in the window
-
- fMain_Subv3 = (CSubviewDisplayer*) itsWindow->FindViewByID(kMain_Subv3ID);
- ASSERT(member(fMain_Subv3, CSubviewDisplayer));
-
- }
-
-
- /******************************************************************************
- FailOpen {OVERRIDE}
-
- Fail if file already open in this application.
-
- This function calls the application's FileAlreadyOpen function
- and fails quietly if the file is open.
-
- Note that open may also fail if the file is open in
- another application. This will cause a failure in open,
- but you may wish to override this function to detect this
- case and provide a more meaningful error message than -49.
- ******************************************************************************/
-
- void x_CMain::FailOpen(
- CFile *aFile)
-
- {
- /* Only the application knows */
- if (((CApp*)gApplication)->FileAlreadyOpen(aFile))
- Failure(kSilentErr, 0);
- }
-
-
- /******************************************************************************
- PositionWindow
-
- The default method in CSaver calls the the decorator, which
- staggers and resizes the window. Since the window has already
- been positioned when it is initialized from the view resource,
- we don't want to do this twice.
- ******************************************************************************/
-
- void x_CMain::PositionWindow()
-
- {
- }
-
-
-
-
-